package org.example.logindemo.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.example.logindemo.bean.RegisterForm;
import org.example.logindemo.bean.RegisterFormDTO;

@Mapper
public interface RegisterMapper {


    @Insert("insert into register (username ,password ,email)" +
            "values " +
            "(#{username},#{password},#{email})")
    void insert(RegisterFormDTO registerFormDTO);

    @Select("select * from register where username = #{username}")
    RegisterForm getByUsername(String username);
}
